import {
    delInquiryInfo,
    delInquiryRelation,
    getInquiryInfo,
    inquiryAudit,
    inquiryList,
    inquiryRelationList,
    insertInquiry,
    updateInquiryInfo
} from '@/services/inquiry/InquiryService';

export default {
    namespace: 'inquiryModel',

    state: {},

    effects: {
        /**
         * 电梯询价—修改联系人信息数据接口
         */* updateInquiryInfo({payload, callback}, {call, put}) {
            const response = yield call(updateInquiryInfo, payload);
            if (callback) callback(response);
        },
        /**
         * 电梯询价管理查询数据接口
         */* inquiryList({payload, callback}, {call, put}) {
            const response = yield call(inquiryList, payload);
            if (callback) callback(response);
        },
        /**
         * 电梯询价审批接口
         */* inquiryAudit({payload, callback}, {call, put}) {
            const response = yield call(inquiryAudit, payload);
            if (callback) callback(response);
        },
        /**
         * 电梯询价—保存数据接口
         */* insertInquiry({payload, callback}, {call, put}) {
            const response = yield call(insertInquiry, payload);
            if (callback) callback(response);
        },
        /**
         * 根据ID获取询价单信息数据接口
         */* getInquiryInfo({payload, callback}, {call, put}) {
            const response = yield call(getInquiryInfo, payload);
            if (callback) callback(response);
        },
        /**
         * 根据ID删除询价表信息数据接口
         */* delInquiryInfo({payload, callback}, {call, put}) {
            const response = yield call(delInquiryInfo, payload);
            if (callback) callback(response);
        },
        /**
         * 根据关联ID删除询价电梯设备关联信息数据接口
         */* delInquiryRelation({payload, callback}, {call, put}) {
            const response = yield call(delInquiryRelation, payload);
            if (callback) callback(response);
        },
        /**
         * 根据询价单ID获取电梯设备列表数据接口
         */* inquiryRelationList({payload, callback}, {call, put}) {
            const response = yield call(inquiryRelationList, payload);
            if (callback) callback(response);
        },
    },

    reducers: {}
}
